<?php
/**
 * Created by PhpStorm.
 * User: yuliang
 * Date: 2017/6/5
 * Time: 下午2:06
 */

namespace app\common\validate;


use think\Validate;

class Course extends Validate
{
    protected $rule = [
        'title' => 'require',
        'teacher_id' => 'require',
        'subtitle' => 'require',
        'description' => 'require',
        'type' => 'require|in:1,2,3,4,5,6,7',
        'hour' => 'require|number',
        'price' => 'float',
        'offline_price' => 'float',
        'id' => 'number',
        'is_free' => 'in:0,1'
    ];

    protected $message = [
        'title' => '必须填写标题'
    ];

}